package com.zheng.hospital.controller;

import com.zheng.hospital.common.result.CommonResult;
import com.zheng.hospital.orderclient.OrderFeignClient;
import com.zheng.hospital.vo.order.OrderCountQueryVo;
import com.zheng.hospital.vo.order.OrderCountVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
@RequestMapping("/admin/statistics")
public class StatisticController {
    @Autowired
    OrderFeignClient orderFeignClient;

    @GetMapping("/getCountMap")
    public CommonResult getCountMap(OrderCountQueryVo orderCountQueryVo) {
        Map<String, Object> resultMap = orderFeignClient.getCountMap(orderCountQueryVo);
        return CommonResult.ok(resultMap);
    }
}
